const express = require('express')
const router = express.Router()

const articlecatehandler = require('../router_handler/articlecate')
//获取所有知识库
router.get('/all',articlecatehandler.getallcategory)
//获取最新的知识库
router.get('/getnew',articlecatehandler.getnewcategory)
//新增知识库
router.post('/add',articlecatehandler.addcategory)
// //删除知识库
// router.get('/removecate/:id',articlecatehandler.removecategory)
//根据id获取知识库
router.get('/get/:id',articlecatehandler.getsomecategory)
//根据id更新知识库
router.post('/update',articlecatehandler.updatecate)
//加入知识库
router.post('/join/:id',articlecatehandler.joinStore)
//查找知识库成员
router.get('/member/:id',articlecatehandler.getStoreMember)
// 查找知识库所有文件
router.get('/file/:id',articlecatehandler.getStoreFile)
// 新建文件夹/附件
router.post('/file/upload',articlecatehandler.uploadFiles)
// 删除文件
router.post('/file/delete',articlecatehandler.deleteFile)
//迁移文件
router.post('/file/move',articlecatehandler.moveFile)

//改文件夹名字
router.post('/file/rename',articlecatehandler.updateFileName)
module.exports = router